import { get, post } from '@/utils/request'

export const phoneLogin = (query) => {
  return post('/sys/phoneLogin', query)
}
export const passwordLogin = (query) => {
  return post('/sys/passLogin', query)
}
// export const passwordLogin = (query) => {
//   return post('/password/login', query)
// }
export const getSmsCodeToken = (query) => {
  return post('/code/create_token.thtml', query)
}
export const updatePassword = (query) => {
  return post('/sys/user/updatePassword', query)
}
export const getRandomImage = (query) => {
  return get('/sys/randomImage/' + query.time, query)
}

export const getSmsCode = (query) => {
  return post('/code/getMobileCode', query)
}
export const logout = (query) => {
  return post('/sys/logout', query)
}

export const registerPcInfo = (query) => {
  return post('/en/reg/addPcInfo', query)
}
export const registerComInfo = (query) => {
  return post('/en/reg/addComInfo', query)
}
export const registerComInfoV2 = (query) => {
  return post('/en/reg/addComInfo2', query)
}
export const registerComInfoEdit = (query) => {
  return post('/en/reg/editComInfo', query)
}
export const registerConfigInfo = (query) => {
  return get('/en/reg/configInfo', query)
}
export const registerStep = (query) => {
  return get('/en/finishInfo/step', query)
}
// export const blockDataAdd = (query) => {
//   return post('/block/data/saveOrUpdateBatch', query)
// }
